/**
 * 全选，正选，反选
 * @param n
 * @constructor
 */
function AAA(n){
    		var cks = document.getElementsByName(n);
    		var len = cks.length;
    		for(var i=0;i<len;i++){
    			if(cks[i].type=="checkbox"){
    				cks[i].checked = !cks[i].checked;
    			}
			}
}
/**
 * 得到被选中的编号
 * @param n
 * @returns {string}
 * @constructor
 */
function BBB(n){
    		var cks = document.getElementsByName(n);
    		var len = cks.length;
    		var cksValue = "";
    		for(var i=0;i<len;i++){
    			if(cks[i].type=="checkbox"){
    				if(cks[i].checked){
    					cksValue+=cks[i].value+",";
    				}
    			}	
			}
    		if(cksValue != ""){
    			cksValue = cksValue.substring(0,cksValue.length-1);
    		}
    return cksValue;
}


/**
 * 模态框的修改
 */
$('#exampleModal').on('show.bs.modal', function (e) {
	//模态框居中
	// 关键代码，如没将modal设置为 block，则$modala_dialog.height() 为零
	$(this).css('display', 'block');
	var modalHeight=$(window).height() / 2 - $('#exampleModal .modal-dialog').height() / 2;
	$(this).find('.modal-dialog').css({
		'margin-top': modalHeight
	});
	//引用点击的按钮的value值 赋给弹框的标题
	var button = $(e.relatedTarget);
	var recipient = button.data('whatever');
	var modal = $(this);
	modal.find('.modal-title').text( recipient);
});
$('#delModal').on('show.bs.modal', function (e) {
	//模态框居中
	// 关键代码，如没将modal设置为 block，则$modala_dialog.height() 为零
	$(this).css('display', 'block');
	var modalHeight=$(window).height() / 2 - $('#delModal .modal-dialog').height() / 2;
	$(this).find('.modal-dialog').css({
		'margin-top': modalHeight-20
	});
	$(".del-title").css("color","#000");
});